<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>

<script type="text/javascript">
    function deleteUsuario() {
        if (confirm("Desea eliminar esta cancha")) {
            return true;
        }
        return false;
    }
</script>
<div class="container">
    <table class="table table-striped">
        <tr>
            <th>Codigo</th>
            <th>Nombre</th>
            <th style="width: 150px;"></th>
            <th style="width: 150px;"></th>
        </tr>
        <c:forEach var="cancha" items="${resultado}">
            <tr>
                <td>${cancha.CoCancha}</td>
                <td>${usuario.NoCancha}</td>
                <td><a href="<c:url value='/pages/cancha/edit?CoCancha=${cancha.CoCancha}'/>">Editar cancha</a></td>
                <td><a href="<c:url value='/pages/cancha/delete?CoCancha=${cancha.CoCancha}'/>" onclick="if (deleteCancha()) { return true; } else { return false; }">Eliminar cancha</a></td>
            </tr>
        </c:forEach>
    </table>
</div>
